# Data Processing # X:input variables X = data.loc[:,[ # 'STATE_CODE', # 'SHRP_ID', # 'YEAR', 'CONSTRUCTION_NO', # 'MAX_MEAN_DEPTH_1_8', 'ANL_KESAL_LTPP_LN_YR', 'TOTAL_ANN_PRECIP', 'FREEZE_INDEX_YR', 'MAX_ANN_TEMP_AVG', 'MAX_ANN_TEMP_DAYS', 'DAYS_ABOVE_32_C_YR', 'MR_MATL_TYPE', 'RES_MOD_AVG', 'REPR_THICKNESS' ]] #y:output predictor y=data.loc[:,['MAX_MEAN_DEPTH_1_8']] #y:output predictor #y2=data.loc[:,['MRI']] # create object of our model # RF_model = RandomForestRegressor(n_estimators= 15, # min_samples_split=2, # min_samples_leaf=1, # # max_features=auto, # max_depth=15, # bootstrap= True) RF_model = RandomForestRegressor() # Prediction X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state = 42) #X_train2, X_test2, y_train2, y_test2 = train_test_split(X2, y2, test_size=0.2, random_state = 42)